package com.foreveross.proxyip.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.foreveross.proxyip.infra.base.ddd.domain.BaseEntity;
import com.foreveross.proxyip.infra.cache.IBufferCacheEntity;


/**
 * The persistent class for the pi_download_ip_website database table.
 * 
 */
@Entity
@Table(name="pi_download_ip_website")
public class IpWebsiteEntity extends BaseEntity  implements IBufferCacheEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;

	private String code;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="create_time")
	private Date createTime;

	private String encoding;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="last_time")
	private Date lastTime;

	private String name;

	@Column(name="row_regex")
	private String rowRegex;

	@Column(name="split_time")
	private Long splitTime;

	private int state;

	@Column(name="url_regex")
	private String urlRegex;

	@Column(name="user_name")
	private String userName;
	
	private String orderid;
	
//	@Transient
//	List<String> rowSplits = null;//每行返回记录的分割符号集合
	@Transient
	List<String> ipRowPositions = null;//记录IpStoreEntity属性在代理ip返回结果结果集中单行记录所在位置

    public IpWebsiteEntity() {
    }

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getEncoding() {
		return this.encoding;
	}

	public void setEncoding(String encoding) {
		this.encoding = encoding;
	}

	public Date getLastTime() {
		return this.lastTime;
	}

	public void setLastTime(Date lastTime) {
		this.lastTime = lastTime;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getSplitTime() {
		return this.splitTime;
	}

	public void setSplitTime(Long splitTime) {
		this.splitTime = splitTime;
	}

	public int getState() {
		return this.state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getOrderid() {
		return orderid;
	}

	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}

	public String getRowRegex() {
		return rowRegex;
	}

	public void setRowRegex(String rowRegex) {
		this.rowRegex = rowRegex;
	}

	public String getUrlRegex() {
		return urlRegex;
	}

	public void setUrlRegex(String urlRegex) {
		this.urlRegex = urlRegex;
	}



//	public List<String> getRowSplits() {
//		return rowSplits;
//	}
//
//	public void setRowSplits(List<String> rowSplits) {
//		this.rowSplits = rowSplits;
//	}

	public void setIpRowPositions(List<String> ipRowPositions) {
		this.ipRowPositions = ipRowPositions;
	}

	public List<String> getIpRowPositions() {
		return ipRowPositions;
	}
	
}